package projetstackoverflow

import groovy.swing.factory.WidgetFactory;

import java.util.Date;

class Comment {

	String content
	Date date
	
	static belongsTo = [message:Message, author:Author]
    static constraints = {
		content(blank:false)
		content(widge:'textarea')
    }
	
	static mapping = {
		content(type:'text')
	}
	
	def String toString() {
		return "Commentaire : "+content+", Date : "+date+", sur le message de l'auteur "+message.author;
	}
}
